<?php
/**
 * Created by chency.
 * User: Administrator
 * Date: 2018/11/4 0004
 * Time: 下午 6:12
 */

namespace app\index\model;

use think\cache\driver\Redis;
use think\Db;
use think\Model;

class SearchModel extends Model {
    public $table = 'tps_search';

    public $description = '----';

    /**
     * 获取列表
     * @param $map
     * @param $page
     * @param int $listRows
     * @return mixed|null|string|\think\Paginator
     * @throws \think\exception\DbException
     */
    public function getList($map, $page, $listRows = 5) {
        $list = [];
    }

    public function addSearch($keywords) {
        $data = [
            'keywords'   => $keywords,
            'created_at' => time()
        ];
        $res  = $this->create($data);
        return $res;
    }
}